#ifndef TDGT_POINT_H
#define TDGT_POINT_H

#include <climits>
#include <iostream>
#include "misc.h"


struct Segment {
    float t;   
    float w; 
    int intv;  
    Segment() : t(0), w(INT_MAX), intv(DE_INTV) {}

    Segment(float _t, float _w) noexcept : t(_t), w(_w), intv(DE_INTV) {}

    Segment(float _t, float _w, int _intv) noexcept : t(_t), w(_w), intv(_intv) {}

    friend std::ostream& operator<<(std::ostream& os, const Segment& seg) {
        os << seg.t << " " << seg.w << " " << seg.intv;
        return os;
    }

    inline bool operator==(const Segment& rhs) {
        return eq(t, rhs.t) && eq(w, rhs.w) && intv == rhs.intv;
    }

    inline bool operator!=(const Segment& rhs) {
        return !(*this == rhs);
    }

};

#endif //TDGT_POINT_H

